//
//  TextFile.h
//  Editor
//
//  Created by Jeppe Nielsen on 10/22/14.
//  Copyright (c) 2014 Jeppe Nielsen. All rights reserved.
//

#pragma once

#include <QtWidgets/QtWidgets>

#include "AngelScriptSyntaxHighlighter.hpp"

class TextFile {

    public:
        void Create(QTabWidget* tabs, QString filename);
        bool Close();
    
        int GetTabIndex();
        void ChangeFilename(QString filename);
        void Save();
    
        QString Path();
    
    private:
        AngelScriptSyntaxHighlighter syntaxHighlighter;
        QPlainTextEdit* textEditor;
        QFileInfo fileInfo;
        QTabWidget* tabWidget;

        void OpenTextFile();

};